@using Jp.UI.SSO.Util
@using Microsoft.AspNetCore.Builder
@using Microsoft.AspNetCore.Mvc.Localization
@using Microsoft.Extensions.Options
@model Jp.UI.SSO.Controllers.Diagnostics.DiagnosticsViewModel
@inject IViewLocalizer Localizer

@section breadcrumb
    {
    <!-- Breadcrumb-->
    <ol class="breadcrumb">
        <li class="breadcrumb-item">@Localizer["Menu-Home"]</li>
        <li class="breadcrumb-item">
            <a asp-action="Index" asp-controller="Home">@Localizer["Menu-User"]</a>
        </li>
        <li class="breadcrumb-item">@Localizer["Menu-Diagnostics"]</li>
    </ol>
}
<div class="row justify-content-center">
    <div class="col-sm-12 col-md-8 col-lg-4">
        <div class="card">
            <div class="card-header text-white bg-success"><strong>@Localizer["Title-Cookie"]</strong></div>
            <div class="card-body">

                <h3>@Localizer["Body-Claims"]</h3>

                <ul class="list-group">
                    @foreach (var claim in Model.AuthenticateResult.Principal.Claims)
                    {
                        <li class="list-group-item list-group-item-accent-primary">
                            @claim.Type: <strong>@claim.Value</strong>
                        </li>

                    }
                </ul>
                <hr />
                <h3>@Localizer["Body-Properties"]</h3>
                <ul class="list-group">
                    @foreach (var prop in Model.AuthenticateResult.Properties.Items)
                    {
                        <li class="list-group-item list-group-item-accent-success">
                            @prop.Key: <strong>@prop.Value</strong>
                        </li>
                    }
                </ul>
                <hr />
                @if (Model.Clients.Any())
                {
                    <h3>@Localizer["Body-Clients"]</h3>
                    <ul class="list-group">
                        @foreach (var client in Model.Clients)
                        {
                            <li class="list-group-item list-group-item-accent-warning">@client</li>
                        }
                    </ul>
                }
            </div>
        </div>
    </div>
    <div class="col-sm-12 col-md-8 col-lg-4">
        <div class="card">
            <div class="card-header text-white bg-success"><strong>Server Info</strong></div>
            <div class="card-body">
                <ul class="list-group">
                    <li class="list-group-item list-group-item-accent-danger">
                        SSO Version: <strong>@SsoVersion.Current</strong>
                    </li>
                    <li class="list-group-item list-group-item-accent-danger">
                        Now: <strong>@DateTime.Now</strong>
                    </li>
                    <li class="list-group-item list-group-item-accent-danger">
                        UTC: <strong>@DateTime.UtcNow</strong>
                    </li>
                    <li class="list-group-item list-group-item-accent-danger">
                        User Management URL: <strong>@Model.UserManagementUrl</strong>
                    </li>
                    <li class="list-group-item list-group-item-accent-danger">
                        Admin Panel: <strong>@Model.AdminPanelUrl</strong>
                    </li>
                    <li class="list-group-item list-group-item-accent-danger">
                        API Location: <strong>@Model.AdminPanelUrl</strong>
                    </li>
                    <li class="list-group-item list-group-item-accent-danger">
                        OS: <strong>@Environment.OSVersion.VersionString</strong>
                    </li>
                    <li class="list-group-item list-group-item-accent-danger">
                        Machine Name: <strong>@Environment.MachineName</strong>
                    </li>
                </ul>
            </div>
        </div>
    </div>
</div>